<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
        axios.get('http://localhost:8080/AuthTest', {
            auth: {
                username: 'lihongxu',
                password: '123456'
            }
        }).then(function (response) {
            console.log(response.data);
        }).catch(function (error) {
            console.log(error);
        }).then(function () {
        });
    </script>
</head>
<body>
ok success
</body>
</html>